﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace SLLottery
{
    public partial class DealInfoWindow : ChildWindow
    {
        private LotterySrv.LotteryServiceClient srv;
        public bool isTopTen = false;
        public DealInfoWindow(Int64 RecordID)
        {
            InitializeComponent();
            srv = WcfProxy.GetProxy;
            srv.GetOrderContentCompleted += new EventHandler<LotterySrv.GetOrderContentCompletedEventArgs>(srv_GetOrderContentCompleted);
            srv.GetOrderContentAsync(RecordID);
            border_Processing.Visibility = Visibility.Visible;
        }

        private void srv_GetOrderContentCompleted(object sender, LotterySrv.GetOrderContentCompletedEventArgs e)
        {
            border_Processing.Visibility = Visibility.Collapsed;
            if (isTopTen)
                e.Result.UserID = "匿名";
            gridMain.DataContext = e.Result;         
        }
    }
}

